package br.com.fiap.mbeans;

import br.com.fiap.bean.Cliente;
import br.com.fiap.dao.ClienteDAO;

public class AutenticadorAgCc {
	
	
	Cliente c = new Cliente();
	ClienteDAO cl = new ClienteDAO();
	
		
	public Cliente getC() {
		return c;
	}
	public void setC(Cliente c) {
		this.c = c;
	}
	
	public String verificarAgCc(){
		if(cl.validaAgCc(c)){
			return "login";
		}
		return "erro_conta";
	}
	
	public String logar(){
		if(cl.validaLogin(c)){
		return "menu";
		}
		return "erro_login";
	}

public String visualizarSaldo(){
		
		cl.getSaldo(c);
		
		return "saldo";
	}
}
